package com.ilancuo.thinkinjava.chapter_02;

import java.io.*;

/**
 * 获取系统属性
 * @author ilancuo
 */
public class ShowProperties {
    public static void main(String[] args) {
        System.getProperties().list(System.out);
        System.out.println("------------------------------------------------");
        System.out.println(System.getProperty("user.name"));
        System.out.println(System.getProperty("java.library.path"));
        System.out.println(System.getProperty("file.separator"));
        try {
            PrintStream stream = new PrintStream("D:\\Hello.txt");
            System.getProperties().list(stream);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
